#ifndef BOID_H
#define BOID_H

#include "Collidable.h"
#include "DrawEvent.h"
#include "UpdateEvent.h"
#include "Mesh.h"
#include <glm/glm.hpp>
#include <AntTweakBar.h>

class Boid : public Collidable, DrawEvent, UpdateEvent{
private:
	Mesh * mesh;

	glm::vec3 position;
	glm::vec3 velocity;
	glm::vec3 acceleration;

	int maxVelocity;
	int minVelocity;

	static float obstacleAvoidanceCoeff;
public:

	Boid();

	static void setObstacleAvoidanceCoeff(float f){ obstacleAvoidanceCoeff = f; }
	static float getObstacleAvoidanceCoeff(){ return obstacleAvoidanceCoeff; }

	static void TW_CALL setObstacleAvoidanceCoeffCallback(const void *value, void *clientData){
		Boid::setObstacleAvoidanceCoeff(*static_cast<const float *>(value));
	}

	static void TW_CALL getObstacleAvoidanceCoeffCallback(void *value, void *clientData){
		*static_cast<float *>(value) = Boid::getObstacleAvoidanceCoeff();
	}

	virtual void draw();
	virtual void update(double dt);
	virtual void collide();

};


#endif